$(function () {
  $('#form_login').on('submit', function (e) {
    e.preventDefault()
    $.ajax({
      method: 'POST',
      url: ' http://192.168.21.69:8360/api/auth/login',
      Headers: {
        contentType: 'application/json'
      },

      data: {
        mobile: $('[name=mobile]').val(),
        password: $('[name=password]').val(),

      },
      success: function (res) {
        if (res.errno !== 0) {

          return alert('登陆失败')
        }
        alert('登陆成功')
        location.href = './user.html'
      }
    })
  })

})